/*mobile version*/
body {
  background-color: #cffcf7;
  padding: 0;
  margin: 0;
  font-size: 16px;
}
.page {
  display: flex;
  flex-direction: column;
  font-family: "Trebuchet MS";
}

.contact {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-contactpagina {
  background-color: #f9fffe;
  gap: 30px;
  padding: 20px;
  border-radius: 5px;
}

.form-contactpagina__inputelement {
  display: flex;
  flex-direction: row;
}

.fx-col {
  flex-direction: column;
}

.form-contactpagina__buttonwrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.input-group {
  font-size: 1.25rem;
  position: relative;
  --primary: #2197f3;
}

.input {
  all: unset;
  color: fefefe;
  padding: 1rem;
  width: 20rem;
  border: 2px solid #9e9e9e;
  border-radius: 10px;
  background-color: white;
  transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

#message {
  overflow-wrap: break-word;
}

.label {
  position: absolute;
  left: 0.8rem;
  color: #d4d4d4;
  pointer-events: none;
  transition: 300ms cubic-bezier(0.4, 0.5, 0.2, 1);
}

label {
  margin-top: 1rem;
}

input:focus + label,
input:valid + label,
textarea:valid + label,
textarea:focus + label {
  transform: translateY(-120%) scale(0.7);
  background-color: #fefefe;
  padding-inline: 0.3rem;
  color: var(--primary);
}

input:focus {
  border: 1px solid var(--primary);
}

input:required:focus:invalid {
  border: 2px solid red;
}

input:valid {
  border: 2px solid green;
}

button:enabled,
button[enabled] {
  background-color: #007fff;
  color: white;
  padding: 12px 36px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

.error {
  display: block;
  height: 1.5em;
  overflow: hidden;
  color: red;
  font-size: 75%;
}

button:disabled,
button[disabled] {
  padding: 12px 36px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid #999999;
  background-color: #cccccc;
  color: #666666;
}

.loader {
  display: none;
  position: fixed;
  top: 40%;
  left: 45%;
  transform: translate(-40%, -45%);
  border: 16px solid #f3f3f3;
  border-top: 16px solid #3498db;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 2s linear infinite;
  z-index: 999;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* desktop version TODO: fix buttons and input placement*/
@media screen and (min-width: 768px) {
  .page {
    flex-direction: row;
  }

  .contact {
    justify-content: center;
  }

  .form-contactpagina {
    padding: 40px;
  }

  .form-contactpagina__inputwrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .form-contactpagina__buttonwrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
  }
}
